!function (a) {
    "use strict";
    if ("undefined" == typeof b)var b = {};
    if ("function" != typeof define || void 0 == define.amd && void 0 == define.cmd) {
        var c = a(b);
        if ("undefined" != typeof module && "object" == typeof exports)module.exports = c; else for (var d in c)"undefined" != typeof window ? window[d] = c[d] : self[d] = c[d]
    } else define(function () {
        return a(b)
    })
}(function (a) {
    "use strict";
    return function (a) {
        var b = "1.0.0", c = {
            aBlitz: "aBlitz",
            yBlitz: "yBlitz",
            webkit: "webkit",
            blink: "blink",
            ios: "ios"
        }, d = a.blitz || (a.blitz = {});
        d.currentWebCore = void 0, d.module = {}, d.version = b, d.listener = {}, d.listener.account = {}, d.listener.account.onChange = function (a) {
        }, d.listener.page = {}, d.listener.account.onCreate = function () {
        }, d.listener.account.onEnter = function () {
        }, d.listener.account.onLeave = function () {
        }, d.listener.network = {}, d.listener.network.onChange = function (a) {
        }, d.listener.time = {}, d.listener.time.onChange = function () {
        }, d.listener.screensaver = {}, d.listener.screensaver.onChange = function (a) {
        }, d.load = function (a) {
            return void 0 != d.module[a] && (d.checkWebcore(), void 0 != d.module[a] && void 0 != d.module[a][d.currentWebCore]) ? (d.module[a][d.currentWebCore].version = d.module[a].version, d.module[a][d.currentWebCore]) : null
        }, d.checkWebcore = function () {
            if (void 0 != d.currentWebCore)return d.currentWebCore;
            var a = "undefined" != typeof navigator ? navigator.userAgent : "Blitz(yunos)", b = (/Android/i.test(a), /Blitz\(android\)/i.test(a)), e = /Blitz\(yunos\)/i.test(a) || /Blitz\(yunos3.0\)/i.test(a) || /Blitz\(yunos\scyclone\)/i.test(a), f = /Blink/i.test(a), g = /iPhone|iPad|iPod/i.test(a);
            return b ? (d.currentWebCore = c.aBlitz, c.aBlitz) : e ? (d.currentWebCore = c.yBlitz, c.yBlitz) : f ? (d.currentWebCore = c.blink, c.blink) : g ? (d.currentWebCore = c.ios, c.ios) : (d.currentWebCore = c.webkit, c.webkit)
        }
    }("undefined" != typeof window ? window : self), function (a, b) {
        var c = a.document, d = Object.prototype.hasOwnProperty, e = b.bridge = a.blitz.bridge || (a.blitz.bridge = {}), f = 1, g = [], h = 3, i = "hybrid", j = "wv_hybrid", k = "iframe_", l = "suc_", m = "err_", n = "defer_", o = "param_", p = "chunk_", q = 6e5, r = 6e4, s = {
            call: function (c, d, e, f, g, h) {
                var i, j;
                if ("function" != typeof f && (f = null), "function" != typeof g && (g = null), "yBlitz" == a.blitz.currentWebCore) {
                    e = e && "object" == typeof e ? JSON.stringify(e) : "";
                    var k = function (a) {
                        h && h > 0 ? (clearTimeout(i), s.onSuccess(i, a)) : (a = t.parseData(a), f && f(a))
                    }, l = function (a) {
                        h && h > 0 ? (clearTimeout(i), s.onFailure(i, a)) : (a = t.parseData(a), g && g(a))
                    };
                    return h && h > 0 && (i = setTimeout(function () {
                        s.onFailure(i, {error: "TIMEOUT"})
                    }, h), t.registerCall(i, f, g)), a.blitzUtil.exec(c, d, e, k, l)
                }
                return "webkit" === a.blitz.currentWebCore, b.promise && (j = b.promise.deferred()), h && h > 0 && (i = setTimeout(function () {
                    s.onFailure(i, {ret: ["WV_ERR::TIMEOUT"]})
                }, h)), t.registerCall(i, f, g, j), t.registerGC(i, h), t.callMethod(c, d, e, i), j ? j.promise() : void 0
            }, fireEvent: function (a, b, d) {
                var e = c.createEvent("HTMLEvents");
                e.initEvent(a, !1, !0), e.param = t.parseData(b || t.getData(d)), c.dispatchEvent(e)
            }, getParam: function (a) {
                return t.getParam(a)
            }, setData: function (a, b) {
                t.setData(a, b)
            }, onSuccess: function (a, b) {
                t.onComplete(a, b, "success")
            }, onFailure: function (a, b) {
                t.onComplete(a, b, "failure")
            }
        }, t = {
            params: {}, chunks: {}, calls: {}, getSid: function () {
                return Math.floor(Math.random() * (1 << 50)) + "" + f++
            }, buildParam: function (a) {
                return a && "object" == typeof a ? JSON.stringify(a) : a || ""
            }, getParam: function (a) {
                return this.params[o + a] || ""
            }, setParam: function (a, b) {
                this.params[o + a] = b
            }, parseData: function (a) {
                var b;
                if (a && "string" == typeof a)try {
                    b = JSON.parse(a)
                } catch (c) {
                    console.log(c + ", str = " + a), b = {ret: a, error: "PARAM_PARSE_ERROR"}
                } else b = a || {};
                return b
            }, setData: function () {
                this.chunks[p + sid] = this.chunks[p + sid] || [], this.chunks[p + sid].push(chunk)
            }, getData: function (a) {
                return this.chunks[p + a] ? this.chunks[p + a].join("") : ""
            }, registerCall: function (a, b, c, d) {
                b && (this.calls[l + a] = b), c && (this.calls[m + a] = c), d && (this.calls[n + a] = d)
            }, unregisterCall: function (a) {
                var b = l + a, c = m + a, d = n + a, e = {};
                return this.calls[b] && (e.success = this.calls[b], delete this.calls[b]), this.calls[c] && (e.failure = this.calls[c], delete this.calls[c]), this.calls[d] && (e.deferred = this.calls[d], delete this.calls[d]), e
            }, useIframe: function (a, b) {
                var d = k + a, e = g.pop();
                e || (e = c.createElement("iframe"), e.setAttribute("frameborder", "0"), e.style.cssText = "width:0;height:0;border:0;display:none;"), e.setAttribute("id", d), e.setAttribute("src", b), e.parentNode || setTimeout(function () {
                    c.body.appendChild(e)
                }, 5)
            }, retrieveIframe: function (a) {
                var b = k + a, d = c.querySelector("#" + b);
                g.length >= h ? c.body.removeChild(d) : g.push(d)
            }, callMethod: function (b, c, d, e) {
                d = t.buildParam(d);
                var f = i + "://" + b + ":" + e + "/" + c + "?" + d;
                if ("ios" == a.blitz.currentWebCore)this.setParam(e, d), this.useIframe(e, f); else {
                    var g = j + ":";
                    a.prompt(f, g)
                }
            }, registerGC: function (a, b) {
                var c = this, d = Math.max(b || 0, q), e = Math.max(b || 0, r);
                setTimeout(function () {
                    c.unregisterCall(a)
                }, d), setTimeout(function () {
                    c.params[o + a] && delete c.params[o + a]
                }, e)
            }, onComplete: function (b, c, d) {
                console.log("timeout onComplete: " + b + " data = " + JSON.stringify(c) + "type = " + JSON.stringify(d)), clearTimeout(b);
                var e = this.unregisterCall(b), f = e.success, g = e.failure, h = e.deferred;
                c = c ? c : this.getData(b), c = this.parseData(c);
                var i = c.ret;
                "string" == typeof i && (c = c.value || c, c.ret || (c.ret = [i])), "success" === d ? (f && f(c), h && h.resolve(c)) : "failure" === d && (g && g(c), h && h.reject(c)), "ios" == a.blitz.currentWebCore ? (this.retrieveIframe(b), this.params[o + b] && delete this.params[o + b]) : this.chunks[p + b] && delete this.chunks[p + b]
            }
        };
        for (var u in s)d.call(e, u) || (e[u] = s[u])
    }("undefined" != typeof window ? window : self, "undefined" != typeof window ? window.lib || (window.lib = {}) : self.lib || (self.lib = {})), function (a) {
        function b(a) {
            var b = a, c = location.href.toString();
            console.log(c);
            for (var d, e = ""; d = b.substring(0, b.indexOf("/"));)if (console.log(d), "." === d)b = b.substring(b.indexOf("/") + 1, b.length), c = c.substring(0, c.lastIndexOf("/") + 1); else {
                if (".." !== d)break;
                b = b.substring(b.indexOf("/") + 1, b.length), c = c.substring(0, c.lastIndexOf("/")), c = c.substring(0, c.lastIndexOf("/") + 1)
            }
            return e = c + b, a = e
        }

        var c = {};
        c.yBlitz = {
            FLAG_IMG_AUTO_FREE: 1,
            FLAG_PAGE_SINGLE_TOP: 536870912,
            FLAG_PAGE_CLEAR_TOP: 67108864,
            FLAG_PAGE_NO_HISTORY: 1073741824,
            FLAG_PAGE_REORDER_TO_FRONT: 131072,
            FLAG_PAGE_CLEAR_TASK: 32768,
            commonApi: function (b, c, d, e) {
                if (b && b.method) {
                    var f = b.obj || "BLUnknown", g = b.method, h = b.params || {};
                    a.bridge.call(f, g, h, c, d, e)
                } else d({error: "need method."})
            },
            startPage: function (c, d, e) {
                "string" == typeof c ? ("." === c.slice(0, 1) && (c = b(c)), a.bridge.call("BLBase", "startActivity", {
                    blitzOpenType: "h5",
                    data: {url: c}
                }, d, e)) : (c && c.data && c.data.url && "." === c.data.url.slice(0, 1) && (c.data.url = b(c.data.url)), c && c.data && c.data.page && "undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0 && 0 == c.data.page.indexOf("page") && (c.data.page = c.data.page.replace(/page/, "stage")), a.bridge.call("BLBase", "startActivity", c, d, e))
            },
            getPageList: function (b, c, d) {
                a.bridge.call("BLBase", "getPageNameListInfo", b, c, d)
            },
            finishPage: function (b, c, d) {
                a.bridge.call("BLBase", "finish", b, c, d)
            },
            startActivity: function (b, c, d) {
                b && b.data && b.data.page && "undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0 && 0 == b.data.page.indexOf("page") && (b.data.page = b.data.page.replace(/page/, "stage")), a.bridge.call("BLBase", "startActivity", b, c, d)
            },
            redirect: function (c, d, e) {
                if (c) {
                    c && c.url && "." === c.url.slice(0, 1) && (c.url = b(c.url)), c.redirect = !0;
                    var f = {};
                    f.blitzOpenType = "h5", f.data = c, setTimeout(function () {
                        a.bridge.call("BLBase", "startActivity", f, d, e)
                    }, 10)
                } else e && e({error: "EMPTY_PARAM"})
            },
            startPageForResult: function (c, d, e) {
                console.log("startPageForResult"), c && c.data && c.data.page && "undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0 && 0 == c.data.page.indexOf("page") && (c.data.page = c.data.page.replace(/page/, "stage")), c && c.data && c.data.url && "." === c.data.url.slice(0, 1) && (c.data.url = b(c.data.url)), a.bridge.call("BLBase", "startActivityForResult", c, d, e)
            },
            setResult: function (b, c, d) {
                a.bridge.call("BLBase", "setResult", b, c, d)
            },
            getPageData: function (b, c, d) {
                a.bridge.call("BLBase", "getPageData", b, c, d)
            },
            isNetworkAvailable: function (b, c, d) {
                a.bridge.call("BLBase", "isNetWorkAvailable", b, c, d)
            },
            isNetWorkAvailable: function (b, c, d) {
                a.bridge.call("BLBase", "isNetWorkAvailable", b, c, d)
            },
            getDeviceInfo: function (b, c, d) {
                a.bridge.call("BLBase", "getDeviceInfo", b, c, d)
            },
            getAppInfo: function (b, c, d) {
                a.bridge.call("BLBase", "getappinfo", b, c, d)
            },
            loading: function (b, c, d) {
                a.bridge.call("BLBase", "loading", b, c, d)
            },
            networkDialog: function (b, c, d) {
                a.bridge.call("BLBase", "networkDialog", b, c, d)
            },
            dialog: function (b, c, d) {
                a.bridge.call("BLBase", "dialog", b, c, d)
            },
            finish: function (b, c, d) {
                a.bridge.call("BLBase", "finish", b, c, d)
            },
            addListener: function (b, c, d) {
                a.bridge.call("BLBase", "addListener", b, c, d)
            },
            removeListener: function (b, c, d) {
                a.bridge.call("BLBase", "removeListener", b, c, d)
            },
            registerBroadcast: function (b, c, d) {
                a.bridge.call("BLBase", "registerbroadcast", b, c, d)
            },
            sendBroadcast: function (b, c, d) {
                a.bridge.call("BLBase", "sendBroadcast", b, c, d)
            },
            unregisterBroadcast: function (b, c, d) {
                a.bridge.call("BLBase", "unregisterbroadcast", b, c, d)
            },
            toast: function (b, c, d) {
                a.bridge.call("BLBase", "toast", b, c, d)
            },
            setScreensaverState: function (b, c, d) {
                a.bridge.call("BLBase", "setScreensaverState", b, c, d)
            },
            getVerNum: function (b, c, d) {
                a.bridge.call("BLBase", "getVerNum", b, c, d)
            }
        }, c.aBlitz = c.yBlitz, c.cBlitz = c.yBlitz, c.webkit = c.yBlitz, c.ios = c.yBlitz, c.blank = {}, a.module.base = c
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            isLogin: function (b, c, d) {
                a.bridge.call("BLAccount", "isLogin", b, c, d)
            }, login: function (b, c, d) {
                if ("undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0) {
                    var e = a.load("base");
                    e ? e.startPage({
                        blitzOpenType: "h5",
                        data: {page: "page://account.yunos.com/index", pageData: b}
                    }, c, d) : d && d({error: "need base module."})
                } else"yBlitz" === a.checkWebcore() && a.bridge.call("BLAccount", "login", b, c, d)
            }, getUserInfo: function (b, c, d) {
                a.bridge.call("BLAccount", "getUserInfo", b, c, d)
            }, getToken: function (b, c, d) {
                a.bridge.call("BLAccount", "getToken", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.account = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            getCurrentNotificationList: function (b, c, d) {
                a.bridge.call("BLAli", "getCurrentNotificationList", b, c, d)
            }, onNotificationClick: function (b, c, d) {
                a.bridge.call("BLAli", "onNotificationClick", b, c, d)
            }, onNotificationClear: function (b, c, d) {
                a.bridge.call("BLAli", "onNotificationClear", b, c, d)
            }, onNotificationClearAll: function (b, c, d) {
                a.bridge.call("BLAli", "onNotificationClearAll", b, c, d)
            }, notify: function (b, c, d) {
                a.bridge.call("BLAli", "notify", b, c, d)
            }, cancel: function (b, c, d) {
                a.bridge.call("BLAli", "cancel", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.notification = b
    }(blitz), function (a) {
        var b = {}, c = function () {
            console.log("BlitzServiceClient not defined.")
        };
        console.log(typeof BlitzServiceClient), "undefined" != typeof BlitzServiceClient && (c = BlitzServiceClient), b.yBlitz = {
            pay: function (b, c, d) {
                if ("undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0) {
                    var e = a.load("base");
                    if (e) {
                        b.order && (b.order = encodeURIComponent(b.order)), b.sign && (b.sign = encodeURIComponent(b.sign));
                        var f, g;
                        "undefined" != typeof navigator && navigator.userAgent.indexOf("cyclone") >= 0 ? g = "file:////data/app/pay.tv.yunos.com/index.html" : "yBlitz" === a.checkWebcore() && (f = "TODO");
                        var h = {};
                        h.data = {}, h.blitzOpenType = "h5", h.data.url = g, h.data.requestCode = b.order || 0, h.data.pageData = {}, h.data.pageData.reqData = b, e.startPageForResult(h, function (a) {
                            var e;
                            a && a.result ? (e = a.result, e.payOrder === b.order ? (e.payExtra = b.extra, console.log("callback to result: " + JSON.stringify(e)), c && c(e)) : d && d({error: "no current pay request"})) : d && d({error: "data format is not correct"})
                        }, function () {
                            console.log("start pay page error"), d && d({error: "start pay page error"})
                        })
                    } else d && d({error: "need base module."})
                } else"yBlitz" === a.checkWebcore() && a.bridge.call("BLPay", "pay", b, c, d)
            }, childlockServiceClient: new c, queryChildLockStatus: function (a, c, d) {
                var e = "service://childlock.tv.yunos.com/childlockservice";
                b.yBlitz.childlockServiceClient.getService(e, function (a) {
                    a.errorCode && 0 != a.errorCode && b.yBlitz.childlockServiceClient.release(e), a.queryChildLockStatus().then(function (a) {
                        "string" == typeof a && (a = JSON.parse(a)), c(a), b.yBlitz.childlockServiceClient.release(e)
                    }, function (a) {
                        try {
                            "string" == typeof a && (a = JSON.parse(a)), d(a)
                        } catch (a) {
                            d()
                        }
                        b.yBlitz.childlockServiceClient.release(e)
                    })
                })
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.pay = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            setWallpaper: function (b, c, d) {
                a.bridge.call("BLSystemUI", "setWallpaper", b, c, d)
            }, showToast: function (b, c, d) {
                a.bridge.call("BLSystemUI", "showToast", b, c, d)
            }, setStatusBarVisibility: function (b, c, d) {
                a.bridge.call("BLSystemUI", "setStatusBarVisibility", b, c, d)
            }, showBarMessage: function (b, c, d) {
                a.bridge.call("BLSystemUI", "showABarMessage", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.systemui = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            ACCOUNT_LOGIN_ACTION: "YUNOS.SYSTEM.LOGIN_CHANGE",
            ACCOUNT_STATUS_LOGIN: "login",
            ACCOUNT_STATUS_LOGOUT: "logout",
            ACCOUNT_STATUS_LOGABORT: "abort",
            login: function (b, c, d) {
                a.bridge.call("BLTyid", "login22", b, c, d)
            },
            loginByKey: function (b, c, d) {
                a.bridge.call("BLTyid", "loginByKey", b, c, d)
            },
            getLoginState: function (b, c, d) {
                a.bridge.call("BLTyid", "getLoginState", b, c, d)
            },
            getKP: function (b, c, d) {
                a.bridge.call("BLTyid", "getKP", b, c, d)
            },
            getLoginId: function (b, c, d) {
                a.bridge.call("BLTyid", "getLoginId", b, c, d)
            },
            getAccountToken: function (b, c, d) {
                a.bridge.call("BLTyid", "getAccountToken", b, c, d)
            },
            clearIDAndToken: function (b, c, d) {
                a.bridge.call("BLTyid", "clearIDAndToken", b, c, d)
            },
            applyMtopToken: function (b, c, d) {
                a.bridge.call("BLTyid", "applyMtopToken", b, c, d)
            },
            applyNewMtopToken: function (b, c, d) {
                a.bridge.call("BLTyid", "applyNewMtopToken", b, c, d)
            },
            peekToken: function (b, c, d) {
                a.bridge.call("BLTyid", "peekToken", b, c, d)
            },
            invalidateToken: function (b, c, d) {
                a.bridge.call("BLTyid", "invalidateToken", b, c, d)
            },
            generateOAuthToken: function (b, c, d) {
                a.bridge.call("BLTyid", "generateOAuthToken", b, c, d)
            },
            getOAuthAppInfo: function (b, c, d) {
                a.bridge.call("BLTyid", "getOAuthAppInfo", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.tyid = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            click: function (b, c, d) {
                a.bridge.call("BLUserTrack", "click", b, c, d)
            }, updatePageProperties: function (b, c, d) {
                a.bridge.call("BLUserTrack", "updatePageProperties", b, c, d)
            }, commitEvent: function (b, c, d) {
                a.bridge.call("BLUserTrack", "commitEvent", b, c, d)
            }, pageEnter: function (b, c, d) {
                a.bridge.call("BLUserTrack", "pageEnter", b, c, d)
            }, pageLeave: function (b, c, d) {
                a.bridge.call("BLUserTrack", "pageLeave", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.usertrack = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            init: function (b, c, d) {
                a.bridge.call("BLim", "imaInit", b, c, d)
            }, term: function (b, c, d) {
                a.bridge.call("BLim", "imaTerm", b, c, d)
            }, sendKeyEvent: function (b, c, d) {
                a.bridge.call("BLim", "imaSendKeyEvent", b, c, d)
            }, forwardKeyEvent: function (b, c, d) {
                a.bridge.call("BLim", "imaForwardKeyEvent", b, c, d)
            }, commitString: function (b, c, d) {
                a.bridge.call("BLim", "imaCommitString", b, c, d)
            }, selectCandidata: function (b, c, d) {
                a.bridge.call("BLim", "imaSelectCandidata", b, c, d)
            }, triggerProperty: function (b, c, d) {
                a.bridge.call("BLim", "imaTriggerProperty", b, c, d)
            }, setShowListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetShowListener", b, c, d)
            }, setHideListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetHideListener", b, c, d)
            }, setUpdateLooktabelListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetUpdateLooktabelListener", b, c, d)
            }, setShowLooktabelListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetShowLooktabelListener", b, c, d)
            }, setHideLooktabelListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetHideLooktabelListener", b, c, d)
            }, setUpdatePreeditStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetUpdatePreeditStringListener", b, c, d)
            }, setShowPreeditStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetShowPreeditStringListener", b, c, d)
            }, setHidePreeditStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetHidePreeditStringListener", b, c, d)
            }, setUpdateAuxStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetUpdateAuxStringListener", b, c, d)
            }, setShowAuxStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetShowAuxStringListener", b, c, d)
            }, setHideAuxStringListener: function (b, c, d) {
                a.bridge.call("BLim", "imaSetHideAuxStringListener", b, c, d)
            }, settingGetImeUuidList: function (b, c, d) {
                a.bridge.call("BLim", "imsettingGetImeUuidList", b, c, d)
            }, settingGetImeInfoByUuid: function (b, c, d) {
                a.bridge.call("BLim", "imsettingGetImeInfoByUuid", b, c, d)
            }, settingGetActiveIme: function (b, c, d) {
                a.bridge.call("BLim", "imsettingGetActiveIme", b, c, d)
            }, settingSetActiveIme: function (b, c, d) {
                a.bridge.call("BLim", "imsettingSetActiveIme", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.im = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            restoreFactoryState: function (b, c, d) {
                a.bridge.call("BLFile", "restoreFactoryState", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.power = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            NETWORK_ACTION: "YUNOS.SYSTEM.NET_CHANGE",
            CONNECTIVITY_REASON: "net.connectivity.CONNECTIVITY_CHANGE",
            TYPE_NONE: -1,
            TYPE_PPPOE: 0,
            TYPE_ETHERNET: 1,
            TYPE_WIFI: 2,
            TYPE_COUNT: 2,
            getActiveNetworkInfo: function (b, c, d) {
                a.bridge.call("BLNetwork", "getConnectitityActiveNetInfo", b, c, d)
            },
            getNetworkInfo: function (b, c, d) {
                a.bridge.call("BLNetwork", "getConnectitityNetInfo", b, c, d)
            },
            getActiveInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLNetwork", "getConnectitityInterfaceActiveConfig", b, c, d)
            },
            getInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLNetwork", "getConnectitityInterfaceConfig", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.connectivity = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            NETWORK_ACTION: "YUNOS.SYSTEM.NET_CHANGE",
            ETH_STATE_CHANGE_REASON: "net.ethernet.ETH_STATE_CHANGED",
            EVENT_ETH_DHCP_START: 524288,
            EVENT_ETH_INTF_CFG_SUCCEEDED: 524289,
            EVENT_ETH_INTF_CFG_FAILED: 524290,
            EVENT_ETH_HW_CONNECTED: 524291,
            EVENT_ETH_HW_DISCONNECTED: 524292,
            EVENT_ETH_HW_PHYCONNECTED: 524293,
            EVENT_ETH_ADDRESS_REMOVED: 524294,
            ETHERNET_ADDR_CFG_MODE_DHCP: 0,
            ETHERNET_ADDR_CFG_MODE_STATIC: 1,
            getEthernetInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLBase", "ethernetGetInterfaceConfig", b, c, d)
            },
            isEthernetDhcpMode: function (b, c, d) {
                a.bridge.call("BLBase", "ethernetIsDhcpMode", b, c, d)
            },
            setEthernetInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLBase", "ethernetSetInterfaceConfig", b, c, d)
            },
            isEthernetWired: function (b, c, d) {
                a.bridge.call("BLBase", "ethernetIsWired", b, c, d)
            },
            isEthernetConnected: function (b, c, d) {
                a.bridge.call("BLBase", "ethernetIsConnected", b, c, d)
            },
            getEthernetMac: function (b, c, d) {
                a.bridge.call("BLBase", "getEthMac", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.ethernet = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            http: function (b, c, d, e) {
                a.bridge.call("BLHttp", "http", b, c, d, e)
            }, request: function (b, c, d, e) {
                a.bridge.call("BLHttp", "http", b, c, d, e)
            }, mtop: function (b, c, d, e) {
                a.bridge.call("BLHttp", "mtop", b, c, d, e)
            }, registerAccountInfo: function (b, c, d) {
                a.bridge.call("BLHttp", "mtopRegisterAccountInfo", b, c, d)
            }, mtopRegisterAccountInfo: function (b, c, d) {
                a.bridge.call("BLHttp", "mtopRegisterAccountInfo", b, c, d)
            }, top: function (b, c, d, e) {
                a.bridge.call("BLHttp", "top", b, c, d, e)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.http = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            isWired: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeIsWired", b, c, d)
            }, isConnected: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeIsConnected", b, c, d)
            }, getConnectionState: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeGetConnectionState", b, c, d)
            }, getUsername: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeGetUsername", b, c, d)
            }, setUsername: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeSetUsername", b, c, d)
            }, getPassword: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeGetPassword", b, c, d)
            }, setPassword: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeSetPassword", b, c, d)
            }, getAutoDial: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeGetAutoDial", b, c, d)
            }, setAutoDial: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeSetAutodial", b, c, d)
            }, connect: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeConnect", b, c, d)
            }, disconnect: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeDisconnect", b, c, d)
            }, getInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLNetwork", "pppoeGetInterfaceConfig", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.pppoe = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            NETWORK_ACTION: "YUNOS.SYSTEM.NET_CHANGE",
            WIFI_SCAN_AVAILABLE: "net.wifi.SCAN_AVAILABLE",
            WIFI_STATE_CHANGED_ACTION: "net.wifi.WIFI_STATE_CHANGED",
            WIFI_AP_STATE_CHANGED_ACTION: "net.wifi.WIFI_AP_STATE_CHANGED",
            CONFIGURED_NETWORKS_CHANGED_ACTION: "net.wifi.CONFIGURED_NETWORKS_CHANGE",
            WIFI_STATE_DISABLING: 0,
            WIFI_STATE_DISABLED: 1,
            WIFI_STATE_ENABLING: 2,
            WIFI_STATE_ENABLED: 3,
            WIFI_STATE_UNKNOWN: 4,
            WIFI_AP_STATE_DISABLING: 5,
            WIFI_AP_STATE_DISABLED: 6,
            WIFI_AP_STATE_ENABLING: 7,
            WIFI_AP_STATE_ENABLED: 8,
            WIFI_AP_STATE_FAILED: 9,
            WIFI_CFG_STATUS_CURRENT: 0,
            WIFI_CFG_STATUS_DISABLED: 1,
            WIFI_CFG_STATUS_ENABLED: 2,
            WIFI_KEY_MGMT_NONE: 0,
            WIFI_KEY_MGMT_WPA_PSK: 1,
            WIFI_KEY_MGMT_EAP: 2,
            WIFI_KEY_MGMT_IEEE8021X: 3,
            WIFI_KEY_MGMT_WPA2_PSK: 4,
            calculateSignalLevel: function (a, b) {
                if (void 0 == a || isNaN(a))return 0;
                void 0 === b && (b = 5);
                var c = -100, d = -55;
                if (c >= a)return 0;
                if (a >= d)return b - 1;
                var e = d - c, f = b - 1;
                return Math.floor((a - c) * f / e)
            },
            setWifiEnable: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiSetEnable", b, c, d)
            },
            getWifiState: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiGetEnable", b, c, d)
            },
            getConfiguredNetworks: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiGetConfiguredNetworks", b, c, d)
            },
            addOrUpdateNetwork: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiAddOrUpdateNetwork", b, c, d)
            },
            removeNetwork: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiRemoveNetwork", b, c, d)
            },
            enableNetwork: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiEnableNetwork", b, c, d)
            },
            disableNetwork: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiDisableNetwork", b, c, d)
            },
            startScan: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiStartScan", b, c, d)
            },
            getScanResults: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiGetScanResults", b, c, d)
            },
            disconnect: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiDisconnect", b, c, d)
            },
            reconnect: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiReconnect", b, c, d)
            },
            getConnectionInfo: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiGetConnectionInfo", b, c, d)
            },
            saveConfiguration: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiSaveConfiguration", b, c, d)
            },
            getInterfaceConfig: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiGetInterfaceConfig", b, c, d)
            },
            setSoftApEnabled: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiApSetEnabled", b, c, d)
            },
            getSoftApEnabled: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiApGetEnabledState", b, c, d)
            },
            getSoftApConfiguration: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiApGetConfiguration", b, c, d)
            },
            setSoftApConfiguration: function (b, c, d) {
                a.bridge.call("BLNetwork", "wifiApSetConfiguration", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.wifi = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            openDatabase: function (b, c, d) {
                a.bridge.call("BLDatabase", "openDatabase", b, c, d)
            }, closeDatabase: function (b, c, d) {
                a.bridge.call("BLDatabase", "closeDatabase", b, c, d)
            }, deleteDatabase: function (b, c, d) {
                a.bridge.call("BLDatabase", "deleteDatabase", b, c, d)
            }, execSql: function (b, c, d) {
                a.bridge.call("BLDatabase", "execSql", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.database = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            getTotalStorage: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageVolumeState", {mountPoint: "/data"}, function (a) {
                    a && a.result ? c({result: a.result.totalSize}) : d("no data")
                }, d)
            }, getAvailableStorage: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageVolumeState", {mountPoint: "/data"}, function (a) {
                    a && a.result ? c({result: a.result.freeSize}) : d("no data")
                }, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.deviceStorage = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            openFile: function (b, c, d) {
                a.bridge.call("BLFile", "openFile", b, c, d)
            }, deleteFile: function (b, c, d) {
                a.bridge.call("BLFile", "deleteFile", b, c, d)
            }, closeFile: function (b, c, d) {
                a.bridge.call("BLFile", "closeFile", b, c, d)
            }, write: function (b, c, d) {
                a.bridge.call("BLFile", "write", b, c, d)
            }, read: function (b, c, d) {
                a.bridge.call("BLFile", "read", b, c, d)
            }, isExists: function (b, c, d) {
                b && void 0 === b.path && (b.path = b.filename), a.bridge.call("BLFile", "isExists", b, c, d)
            }, isDirectory: function (b, c, d) {
                b && void 0 === b.path && (b.path = b.filename), a.bridge.call("BLFile", "isDirectory", b, c, d)
            }, isFile: function (b, c, d) {
                b && void 0 === b.path && (b.path = b.filename), a.bridge.call("BLFile", "isFile", b, c, d)
            }, getFileList: function (b, c, d) {
                b && void 0 === b.path && (b.path = b.filename), a.bridge.call("BLFile", "getFileList", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.file = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            STORAGE_ACTION: "YUNOS.SYSTEM.STORAGE_CHANGE",
            STORAGE_VOLUME_STATE: {
                STORAGE_STATUS_INIT: -1,
                STORAGE_STATUS_NOMEDIA: 0,
                STORAGE_STATUS_IDLE: 1,
                STORAGE_STATUS_PENDING: 2,
                STORAGE_STATUS_CHECKING: 3,
                STORAGE_STATUS_MOUNTED: 4,
                STORAGE_STATUS_UNMOUNTING: 5,
                STORAGE_STATUS_FORMATTING: 6,
                STORAGE_STATUS_SHARED: 7,
                STORAGE_STATUS_SHAREDMNT: 8
            },
            getTotalStorage: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageVolumeState", {mountPoint: "/data"}, function (a) {
                    a && a.result ? c({result: a.result.totalSize}) : d("no data")
                }, d)
            },
            getAvailableStorage: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageVolumeState", {mountPoint: "/data"}, function (a) {
                    a && a.result ? c({result: a.result.freeSize}) : d("no data")
                }, d)
            },
            getExternalVolumes: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageExternalVolume", b, c, d)
            },
            getVolumeState: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageVolumeState", b, c, d)
            },
            getMountError: function (b, c, d) {
                a.bridge.call("BLStorage", "getStorageError", b, c, d)
            },
            getSambaVolume: function (b, c, d) {
                a.bridge.call("BLStorage", "getSambaVolume", b, c, d)
            },
            mountVolume: function (b, c, d) {
                a.bridge.call("BLStorage", "mountVolume", b, c, d)
            },
            unmountVolume: function (b, c, d) {
                a.bridge.call("BLStorage", "unmountVolume", b, c, d)
            },
            formatVolume: function (b, c, d) {
                a.bridge.call("BLStorage", "formatVolume", b, c, d)
            },
            startSamba: function (b, c, d) {
                a.bridge.call("BLStorage", "startSamba", b, c, d)
            },
            stopSamba: function (b, c, d) {
                a.bridge.call("BLStorage", "stopSamba", b, c, d)
            },
            getSambaStatus: function (b, c, d) {
                a.bridge.call("BLStorage", "getSambaVolumes", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.mount = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            setSystemProperty: function (b, c, d) {
                a.bridge.call("BLFile", "setSystemPro", b, c, d)
            }, getSystemProperty: function (b, c, d) {
                a.bridge.call("BLFile", "getSystemPro", b, c, d)
            }, setGlobalDB: function (b, c, d) {
                a.bridge.call("BLFile", "setGlobalDB", b, c, d)
            }, getGlobalDB: function (b, c, d) {
                a.bridge.call("BLFile", "getGlobalDB", b, c, d)
            }, getDeviceName: function (b, c, d) {
                a.bridge.call("BLFile", "getDeviceName", b, c, d)
            }, setDeviceName: function (b, c, d) {
                a.bridge.call("BLFile", "setDeviceName", b, c, d)
            }, getDeviceMode: function (b, c, d) {
                a.bridge.call("BLFile", "getDeviceMode", b, c, d)
            }, getDeviceUuid: function (b, c, d) {
                a.bridge.call("BLFile", "getDeviceUuid", b, c, d)
            }, getSystemVersion: function (b, c, d) {
                a.bridge.call("BLFile", "getSystemVersion", b, c, d)
            }, getReleaseVersion: function (b, c, d) {
                a.bridge.call("BLFile", "getReleaseVersion", b, c, d)
            }, getDeveloperSwitch: function (b, c, d) {
                a.bridge.call("BLFile", "getDeveloperDebug", b, c, d)
            }, setDeveloperSwitch: function (b, c, d) {
                a.bridge.call("BLFile", "setDeveloper", b, c, d)
            }, getScreenSaverTime: function (b, c, d) {
                a.bridge.call("BLFile", "getScreenSaverTime", b, c, d)
            }, setScreenSaverTime: function (b, c, d) {
                a.bridge.call("BLFile", "setScreenSaverTime", b, c, d)
            }, getCurrDormancyTime: function (b, c, d) {
                a.bridge.call("BLFile", "getDormancyTime", b, c, d)
            }, setCurrDormancyTime: function (b, c, d) {
                a.bridge.call("BLFile", "setDormancyTime", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.property = b
    }(blitz), function (a) {
        var b = {};
        b.yBlitz = {
            install: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "install", b, c, d)
            }, uninstall: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "uninstall", b, c, d)
            }, getInstalledApps: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "queryAllInstalled", b, c, d)
            }, getAppInfo: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "queryPackage", b, c, d)
            }, getAppStatus: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "getAppStatus", b, c, d)
            }, setAppStatus: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "setAppStatus", b, c, d)
            }, checkSignatrue: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "checkSignatrue", b, c, d)
            }, checkPermission: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "checkPermission", b, c, d)
            }, isPlatformSig: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "isPlatformSig", b, c, d)
            }, getAppSize: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "getAppSize", b, c, d)
            }, getAppDataSize: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "getAppDataSize", b, c, d)
            }, getAppTotalSize: function (b, c, d) {
                a.bridge.call("BLPacakageManager", "getAppTotalSize", b, c, d)
            }
        }, b.aBlitz = b.yBlitz, b.webkit = b.yBlitz, b.ios = b.yBlitz, b.blank = {}, a.module.packageManager = b
    }(blitz), blitz
});